using Google.ProtocolBuffers;
using Google.ProtocolBuffers.Collections;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class ShareCardRequest : GeneratedMessageLite<ShareCardRequest, ShareCardRequest.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<ShareCardRequest, ShareCardRequest.Builder>
		{
			private bool resultIsReadOnly;
			private ShareCardRequest result;
			protected override ShareCardRequest.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override ShareCardRequest MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override ShareCardRequest DefaultInstanceForType
			{
				get
				{
					return ShareCardRequest.DefaultInstance;
				}
			}
			public BaseRequest BaseRequest
			{
				get
				{
					return this.result.BaseRequest;
				}
				set
				{
					this.SetBaseRequest(value);
				}
			}
			public uint OpCode
			{
				get
				{
					return this.result.OpCode;
				}
				set
				{
					this.SetOpCode(value);
				}
			}
			public string SrcFriendUserName
			{
				get
				{
					return this.result.SrcFriendUserName;
				}
				set
				{
					this.SetSrcFriendUserName(value);
				}
			}
			public uint DestFriendCount
			{
				get
				{
					return this.result.DestFriendCount;
				}
				set
				{
					this.SetDestFriendCount(value);
				}
			}
			public IPopsicleList<ShareCardDestInfo> DestFriendListList
			{
				get
				{
					return this.PrepareBuilder().destFriendList_;
				}
			}
			public int DestFriendListCount
			{
				get
				{
					return this.result.DestFriendListCount;
				}
			}
			public Builder()
			{
				this.result = ShareCardRequest.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(ShareCardRequest cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private ShareCardRequest PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					ShareCardRequest other = this.result;
					this.result = new ShareCardRequest();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override ShareCardRequest.Builder Clear()
			{
				this.result = ShareCardRequest.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override ShareCardRequest.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new ShareCardRequest.Builder(this.result);
				}
				return new ShareCardRequest.Builder().MergeFrom(this.result);
			}
			public override ShareCardRequest BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override ShareCardRequest.Builder MergeFrom(IMessageLite other)
			{
				if (other is ShareCardRequest)
				{
					return this.MergeFrom((ShareCardRequest)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override ShareCardRequest.Builder MergeFrom(ShareCardRequest other)
			{
				return this;
			}
			public override ShareCardRequest.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override ShareCardRequest.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(ShareCardRequest._shareCardRequestFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = ShareCardRequest._shareCardRequestFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 16u)
					{
						if (num3 == 0u)
						{
							throw InvalidProtocolBufferException.InvalidTag();
						}
						if (num3 == 10u)
						{
							BaseRequest.Builder builder = BaseRequest.CreateBuilder();
							if (this.result.hasBaseRequest)
							{
								builder.MergeFrom(this.BaseRequest);
							}
							input.ReadMessage(builder, extensionRegistry);
							this.BaseRequest = builder.BuildPartial();
							continue;
						}
						if (num3 == 16u)
						{
							this.result.hasOpCode = input.ReadUInt32(ref this.result.opCode_);
							continue;
						}
					}
					else
					{
						if (num3 == 26u)
						{
							this.result.hasSrcFriendUserName = input.ReadString(ref this.result.srcFriendUserName_);
							continue;
						}
						if (num3 == 32u)
						{
							this.result.hasDestFriendCount = input.ReadUInt32(ref this.result.destFriendCount_);
							continue;
						}
						if (num3 == 42u)
						{
							input.ReadMessageArray<ShareCardDestInfo>(num, text, this.result.destFriendList_, ShareCardDestInfo.DefaultInstance, extensionRegistry);
							continue;
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public ShareCardRequest.Builder SetBaseRequest(BaseRequest value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasBaseRequest = true;
				this.result.baseRequest_ = value;
				return this;
			}
			public ShareCardRequest.Builder SetBaseRequest(BaseRequest.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasBaseRequest = true;
				this.result.baseRequest_ = builderForValue.Build();
				return this;
			}
			public ShareCardRequest.Builder MergeBaseRequest(BaseRequest value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasBaseRequest && this.result.baseRequest_ != BaseRequest.DefaultInstance)
				{
					this.result.baseRequest_ = BaseRequest.CreateBuilder(this.result.baseRequest_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.baseRequest_ = value;
				}
				this.result.hasBaseRequest = true;
				return this;
			}
			public ShareCardRequest.Builder ClearBaseRequest()
			{
				this.PrepareBuilder();
				this.result.hasBaseRequest = false;
				this.result.baseRequest_ = null;
				return this;
			}
			public ShareCardRequest.Builder SetOpCode(uint value)
			{
				this.PrepareBuilder();
				this.result.hasOpCode = true;
				this.result.opCode_ = value;
				return this;
			}
			public ShareCardRequest.Builder ClearOpCode()
			{
				this.PrepareBuilder();
				this.result.hasOpCode = false;
				this.result.opCode_ = 0u;
				return this;
			}
			public ShareCardRequest.Builder SetSrcFriendUserName(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasSrcFriendUserName = true;
				this.result.srcFriendUserName_ = value;
				return this;
			}
			public ShareCardRequest.Builder ClearSrcFriendUserName()
			{
				this.PrepareBuilder();
				this.result.hasSrcFriendUserName = false;
				this.result.srcFriendUserName_ = "";
				return this;
			}
			public ShareCardRequest.Builder SetDestFriendCount(uint value)
			{
				this.PrepareBuilder();
				this.result.hasDestFriendCount = true;
				this.result.destFriendCount_ = value;
				return this;
			}
			public ShareCardRequest.Builder ClearDestFriendCount()
			{
				this.PrepareBuilder();
				this.result.hasDestFriendCount = false;
				this.result.destFriendCount_ = 0u;
				return this;
			}
			public ShareCardDestInfo GetDestFriendList(int index)
			{
				return this.result.GetDestFriendList(index);
			}
			public ShareCardRequest.Builder SetDestFriendList(int index, ShareCardDestInfo value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.destFriendList_[index] = value;
				return this;
			}
			public ShareCardRequest.Builder SetDestFriendList(int index, ShareCardDestInfo.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.destFriendList_[index] = builderForValue.Build();
				return this;
			}
			public ShareCardRequest.Builder AddDestFriendList(ShareCardDestInfo value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.destFriendList_.Add(value);
				return this;
			}
			public ShareCardRequest.Builder AddDestFriendList(ShareCardDestInfo.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.destFriendList_.Add(builderForValue.Build());
				return this;
			}
			public ShareCardRequest.Builder AddRangeDestFriendList(IEnumerable<ShareCardDestInfo> values)
			{
				this.PrepareBuilder();
				this.result.destFriendList_.Add(values);
				return this;
			}
			public ShareCardRequest.Builder ClearDestFriendList()
			{
				this.PrepareBuilder();
				this.result.destFriendList_.Clear();
				return this;
			}
		}
		public const int BaseRequestFieldNumber = 1;
		public const int OpCodeFieldNumber = 2;
		public const int SrcFriendUserNameFieldNumber = 3;
		public const int DestFriendCountFieldNumber = 4;
		public const int DestFriendListFieldNumber = 5;
		private static readonly ShareCardRequest defaultInstance;
		private static readonly string[] _shareCardRequestFieldNames;
		private static readonly uint[] _shareCardRequestFieldTags;
		private bool hasBaseRequest;
		private BaseRequest baseRequest_;
		private bool hasOpCode;
		private uint opCode_;
		private bool hasSrcFriendUserName;
		private string srcFriendUserName_ = "";
		private bool hasDestFriendCount;
		private uint destFriendCount_;
		private PopsicleList<ShareCardDestInfo> destFriendList_ = new PopsicleList<ShareCardDestInfo>();
		private int memoizedSerializedSize = -1;
		public static ShareCardRequest DefaultInstance
		{
			get
			{
				return ShareCardRequest.defaultInstance;
			}
		}
		public override ShareCardRequest DefaultInstanceForType
		{
			get
			{
				return ShareCardRequest.DefaultInstance;
			}
		}
		protected override ShareCardRequest ThisMessage
		{
			get
			{
				return this;
			}
		}
		public BaseRequest BaseRequest
		{
			get
			{
				return this.baseRequest_ ?? BaseRequest.DefaultInstance;
			}
		}
		public uint OpCode
		{
			get
			{
				return this.opCode_;
			}
		}
		public string SrcFriendUserName
		{
			get
			{
				return this.srcFriendUserName_;
			}
		}
		public uint DestFriendCount
		{
			get
			{
				return this.destFriendCount_;
			}
		}
		public IList<ShareCardDestInfo> DestFriendListList
		{
			get
			{
				return this.destFriendList_;
			}
		}
		public int DestFriendListCount
		{
			get
			{
				return this.destFriendList_.Count;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasBaseRequest && this.hasOpCode && this.hasDestFriendCount && this.BaseRequest.IsInitialized;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasBaseRequest)
				{
					num += CodedOutputStream.ComputeMessageSize(1, this.BaseRequest);
				}
				if (this.hasOpCode)
				{
					num += CodedOutputStream.ComputeUInt32Size(2, this.OpCode);
				}
				if (this.hasSrcFriendUserName)
				{
					num += CodedOutputStream.ComputeStringSize(3, this.SrcFriendUserName);
				}
				if (this.hasDestFriendCount)
				{
					num += CodedOutputStream.ComputeUInt32Size(4, this.DestFriendCount);
				}
				using (IEnumerator<ShareCardDestInfo> enumerator = this.DestFriendListList.GetEnumerator())
				{
					while (enumerator.MoveNext())
					{
						ShareCardDestInfo current = enumerator.get_Current();
						num += CodedOutputStream.ComputeMessageSize(5, current);
					}
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private ShareCardRequest()
		{
		}
		public ShareCardDestInfo GetDestFriendList(int index)
		{
			return this.destFriendList_[index];
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] shareCardRequestFieldNames = ShareCardRequest._shareCardRequestFieldNames;
			if (this.hasBaseRequest)
			{
				output.WriteMessage(1, shareCardRequestFieldNames[0], this.BaseRequest);
			}
			if (this.hasOpCode)
			{
				output.WriteUInt32(2, shareCardRequestFieldNames[3], this.OpCode);
			}
			if (this.hasSrcFriendUserName)
			{
				output.WriteString(3, shareCardRequestFieldNames[4], this.SrcFriendUserName);
			}
			if (this.hasDestFriendCount)
			{
				output.WriteUInt32(4, shareCardRequestFieldNames[1], this.DestFriendCount);
			}
			if (this.destFriendList_.Count > 0)
			{
				output.WriteMessageArray<ShareCardDestInfo>(5, shareCardRequestFieldNames[2], this.destFriendList_);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasBaseRequest)
			{
				num ^= this.baseRequest_.GetHashCode();
			}
			if (this.hasOpCode)
			{
				num ^= this.opCode_.GetHashCode();
			}
			if (this.hasSrcFriendUserName)
			{
				num ^= this.srcFriendUserName_.GetHashCode();
			}
			if (this.hasDestFriendCount)
			{
				num ^= this.destFriendCount_.GetHashCode();
			}
			using (IEnumerator<ShareCardDestInfo> enumerator = this.destFriendList_.GetEnumerator())
			{
				while (enumerator.MoveNext())
				{
					ShareCardDestInfo current = enumerator.get_Current();
					num ^= current.GetHashCode();
				}
			}
			return num;
		}
		public override bool Equals(object value)
		{
			ShareCardRequest shareCardRequest = value as ShareCardRequest;
			if (shareCardRequest == null)
			{
				return false;
			}
			if (this.hasBaseRequest != shareCardRequest.hasBaseRequest || (this.hasBaseRequest && !this.baseRequest_.Equals(shareCardRequest.baseRequest_)))
			{
				return false;
			}
			if (this.hasOpCode != shareCardRequest.hasOpCode || (this.hasOpCode && !this.opCode_.Equals(shareCardRequest.opCode_)))
			{
				return false;
			}
			if (this.hasSrcFriendUserName != shareCardRequest.hasSrcFriendUserName || (this.hasSrcFriendUserName && !this.srcFriendUserName_.Equals(shareCardRequest.srcFriendUserName_)))
			{
				return false;
			}
			if (this.hasDestFriendCount != shareCardRequest.hasDestFriendCount || (this.hasDestFriendCount && !this.destFriendCount_.Equals(shareCardRequest.destFriendCount_)))
			{
				return false;
			}
			if (this.destFriendList_.Count != shareCardRequest.destFriendList_.Count)
			{
				return false;
			}
			for (int i = 0; i < this.destFriendList_.Count; i++)
			{
				if (!this.destFriendList_[i].Equals(shareCardRequest.destFriendList_[i]))
				{
					return false;
				}
			}
			return true;
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<ShareCardRequest, ShareCardRequest.Builder>.PrintField("BaseRequest", this.hasBaseRequest, this.baseRequest_, writer);
			GeneratedMessageLite<ShareCardRequest, ShareCardRequest.Builder>.PrintField("OpCode", this.hasOpCode, this.opCode_, writer);
			GeneratedMessageLite<ShareCardRequest, ShareCardRequest.Builder>.PrintField("SrcFriendUserName", this.hasSrcFriendUserName, this.srcFriendUserName_, writer);
			GeneratedMessageLite<ShareCardRequest, ShareCardRequest.Builder>.PrintField("DestFriendCount", this.hasDestFriendCount, this.destFriendCount_, writer);
			GeneratedMessageLite<ShareCardRequest, ShareCardRequest.Builder>.PrintField<ShareCardDestInfo>("DestFriendList", this.destFriendList_, writer);
		}
		public static ShareCardRequest ParseFrom(byte[] data)
		{
			return ShareCardRequest.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private ShareCardRequest MakeReadOnly()
		{
			this.destFriendList_.MakeReadOnly();
			return this;
		}
		public static ShareCardRequest.Builder CreateBuilder()
		{
			return new ShareCardRequest.Builder();
		}
		public override ShareCardRequest.Builder ToBuilder()
		{
			return ShareCardRequest.CreateBuilder(this);
		}
		public override ShareCardRequest.Builder CreateBuilderForType()
		{
			return new ShareCardRequest.Builder();
		}
		public static ShareCardRequest.Builder CreateBuilder(ShareCardRequest prototype)
		{
			return new ShareCardRequest.Builder(prototype);
		}
		static ShareCardRequest()
		{
			ShareCardRequest.defaultInstance = new ShareCardRequest().MakeReadOnly();
			ShareCardRequest._shareCardRequestFieldNames = new string[]
			{
				"BaseRequest",
				"DestFriendCount",
				"DestFriendList",
				"OpCode",
				"SrcFriendUserName"
			};
			ShareCardRequest._shareCardRequestFieldTags = new uint[]
			{
				10u,
				32u,
				42u,
				16u,
				26u
			};
			object.ReferenceEquals(micromsg.Proto.ShareCardRequest.Descriptor, null);
		}
	}
}
